const fs = require('fs');  
const path = require('path');  
const svg2ttf = require('svg2ttf');

module.exports = function(opt) {
  // svg创建成功， 再创建ttf
  let ttf = svg2ttf(fs.readFileSync(opt.svgPath, 'utf8'), opt.svg2ttf);
  let ttfFont = new Buffer(ttf.buffer);
  
  fs.writeFileSync(opt.ttfPath, ttfFont);
  return ttfFont;
};
